Sqlj is a convention for embedding those sql statements in java , in a way that allows programming tools to perform translation - time compile - time analysis of sql in java , for syntax checking of sql statements , for type checking to determine that the data exchanged between java and sql have compatible types and proper type conversions , and for schema checking to assure that the sql constructs are well - formed and valid in the database schema where they will be executed Sqlj是在java中嵌入這些sql語句的一種約定,它是以某種允許編程工具對java中sql進(jìn)行編譯時分析的方式實現(xiàn)嵌入的,在編譯時會對sql語句進(jìn)行語法檢查以保證語法的正確性,進(jìn)行類型檢查以確定java和sql之間交換的數(shù)據(jù)具有兼容的類型和適當(dāng)?shù)念愋娃D(zhuǎn)換,以及進(jìn)行模式檢查以確保sql結(jié)構(gòu)在它們執(zhí)行時所在的數(shù)據(jù)庫模式中是格式良好的、合法的。